import request from 'axios'

const api_name = '/admin/system/classif'

export default {
  // 根据id查询
  getTreeNodes(courseId) {
    return request({
      url: `${api_name}/findAll/${courseId}`,
      method: 'get'
    })
  },
  // 查询所有数据
  getTreeNodesAll() {
    return request({
      url: `${api_name}/findAll`,
      method: 'get'
    })
  },
  // 添加
  save(classification) {
    return request({
      url: `${api_name}/save`,
      method: 'post',
      data: classification
    })
  },

  //修改
  updateById(classification) {
    return request({
      url: `${api_name}/update`,
      method: 'put',
      data: classification
    })
  },
  //批量删除图书
  batchRemove(idList) {
    return request({
      url: `${api_name}/batchRemove`,
      method: 'delete',
      data: idList
    })
  }
}